From 9bd229dff58ddb96f08e9307a1a668efc3548db5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 22 Jul 2014 15:42:56 -0400 Subject: [PATCH] pull-local: Write detached metadata into the correct repository We want to write to the dest repo, not src. Noticed while reviewing this code for some other bug. https://bugzilla.gnome.org/show_bug.cgi?id=733579 --- src/ostree/ot-builtin-pull-local.c | 2 +- tests/test-basic.sh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ostree/ot-builtin-pull-local.c b/src/ostree/ot-builtin-pull-local.c index b5b5728f..50b05a6f 100644 --- a/src/ostree/ot-builtin-pull-local.c +++ b/src/ostree/ot-builtin-pull-local.c @@ -91,7 +91,7 @@ import_one_object (OtLocalCloneData *data, if (detached_meta) { - if (!ostree_repo_write_commit_detached_metadata (data->src_repo, + if (!ostree_repo_write_commit_detached_metadata (data->dest_repo, checksum, detached_meta, cancellable, error)) goto out; diff --git a/tests/test-basic.sh b/tests/test-basic.sh index e0783855..5bac71c8 100755 --- a/tests/test-basic.sh +++ b/tests/test-basic.sh @@ -326,6 +326,8 @@ rm repo2 -rf mkdir repo2 ${CMD_PREFIX} ostree --repo=repo2 init ${CMD_PREFIX} ostree --repo=repo2 pull-local repo +ostree --repo=repo2 show --print-detached-metadata-key=SIGNATURE test2 > test2-meta +assert_file_has_content test2-meta "HANCOCK" echo "ok pull-local after commit metadata" cd ${test_tmpdir} -- 2.30.2